const crypto = require('crypto')

const password = 'abc123'

const hash= crypto
    .createHash('sha1')
    .update(password) //加密字段
    .digest('hex') //加密形状
console.log(hash)